package buda.tabWidget;

import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;

import android.app.TabActivity;
import android.content.Intent;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

import android.widget.ArrayAdapter;


public class TwitterListActivity extends android.app.ListActivity 
{

	@Override
	public void onCreate(Bundle savedInstanceState) 
	{
	  super.onCreate(savedInstanceState);
	 
	  String twitterResult ="";
	try
	{
		twitterResult = new TwitterAsyncTask().doInBackground(
				  new URL("http://search.twitter.com/search.atom?q=thejamhole"));
	}
	catch (MalformedURLException e)
	{
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	  
	  String[] items = new String[3];
	  items[0] = "hi";
	  items[1] = twitterResult;
	  items[2] = "here";
	  setListAdapter(new ArrayAdapter<String>(
			  this, 
			  android.R.layout.simple_list_item_1, 
			  items));
	  getListView().setTextFilterEnabled(true);
	}
	
}
